<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>宜佳佳_孩子的家庭学习管理专家_宜佳佳电商平台_宜佳佳教育平台_宜佳佳网_</title>
  <link rel="Shortcut Icon" href="<%=request.getContextPath() %>/js/yjj_ui1/lloo.jpg" />
  <meta name="keywords" content="宜佳佳,名师一对一,直播小班课,视频直播,在线答疑,弱项诊断，密卷库，小班课">
  <meta name="description" content="宜佳佳——孩子的家庭学习管理专家，宜佳佳由北京易教空间教育科技股份有限公司研发和运营，是专为K12学段中小学生提供个性化学习辅助指导的在线平台。">
  <meta http-equiv="cache-control" content="no-cache">
  <link rel="stylesheet" href="<%=request.getContextPath() %>/js/yjj_ui3/login.css">
  <script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.8.2.min.js"></script>
  <%-- <script type="text/javascript" src="<%=request.getContextPath() %>/js/yjj_ui3/jquery-1.9.1.min.js.下载"></script> --%>
  <script type="text/javascript" src="<%=request.getContextPath() %>/js/yjj_ui3/md5.js.下载" defer="" async=""></script>
  <script type="text/javascript">
  	
    $(function(){
      //var ifremember=${ifremember};
      //alert(ifremember)
    /*  if(ifremember==1){
     	$("[name='remember']").attr("checked",true);
     }; */
    var ifremember= $("[name='ifremember']").val();
   if(ifremember==1){
   	$("[name='remember']").attr("checked",true);
   }
    });
    
    //登录功能
    function onlogin(){
    	$("#tel").empty();
		$("#pwd").empty();
		$("#code").empty();
		var tel=$("[name='tel']").val();
		var pwd=$("[name='pwd']").val();
		var invitenumber=$("[name='code']").val();
		 //判断电话号是否为空
		if(tel==""){
			$("#tel").append("<font color='red' size='2em'>手机号不能为空</font>");
		}
		//判断密码是否为空
		if(pwd==""){
			$("#pwd").append("<font color='red' size='2em'>密码不能为空</font>");
		}
		//判断验证码是否为空
		if(invitenumber==""){
			$("#code").append("<font color='red' size='2em'>验证码不能为空</font>");
		}
		var age=$("[name='remember']:checked").val();
		if($("[name='remember']:checked").val()==1){
			//当电话号码和密码and验证码不为空时才让执行登录功能
			if(tel!=""&&pwd!=""&&invitenumber!=""){
				$.post(
					"onLogin",
					{tel:tel,pwd:pwd,invitenumber:invitenumber,age:age},
					function(msg){
						if(msg==1){
							alert("温情提示:登陆成功");
							var logintiao=$("[name='login']").val();
							var tid=$("[name='tid']").val();
							location.href=logintiao+"?tid="+tid;
						}else if(msg==0){
							$("#tel").append("<font color='red' size='3em'>用户不存在</font>");
						}else if(msg==2){
							$("#pwd").append("<font color='red' size='3em'>密码不正确</font>");
						}else if(msg==3){
							$("#code").append("<font color='red' size='3em'>验证码输入不正确</font>");
						}else if(msg==6){
							alert("欢迎您,尊敬的管理员");
							location.href="manage";
						}else if(msg==9){
							alert("欢迎您,尊敬的老师");
							location.href="teacherSet";
						}
					},"text"
				);
			}
		}else{
			//当电话号码和密码and验证码不为空时才让执行登录功能
			if(tel!=""&&pwd!=""&&invitenumber!=""){
				$.post(
					"onLogin",
					{tel:tel,pwd:pwd,invitenumber:invitenumber},
					function(msg){
						if(msg==1){
							alert("温情提示:登陆成功");
							var logintiao=$("[name='login']").val();
							var tid=$("[name='tid']").val();
							location.href=logintiao+"?tid="+tid;
						}else if(msg==0){
							$("#tel").append("<font color='red' size='3em'>用户不存在</font>");
						}else if(msg==2){
							$("#pwd").append("<font color='red' size='3em'>密码不正确</font>");
						}else if(msg==3){
							$("#code").append("<font color='red' size='3em'>验证码输入不正确</font>");
						}else if(msg==6){
							alert("欢迎您,尊敬的管理员");
							location.href="manage";
						}else if(msg==9){
							alert("欢迎您,尊敬的老师");
							location.href="teacherSet";
						}
					},"text"
				);
			}
		}
		
    }
    
    //获取验证码
    function changeCode() {    
		var imgNode = document.getElementById("vimg");                    
		imgNode.src = "AuthImageServlet?t=" + Math.random();  // 防止浏览器缓存的问题       
 	}
 	
 	//按回车键,直接执行登录功能
 	function login(){
 		if(event.keyCode==13){
 			onlogin();//调用登录功能
 		}
 	}
  </script>

</head>
<body>
<div class="header">
  <div class="header-topNav">
    <div class="header-topCont clearfix">
      <div class="header-topLeft">
      </div>
		<marquee scrollamount="3" behavior="alternate"><font color="yellow" size="6em" style="font-family: '华文行楷'">欢迎来到登录页面</font></marquee>
    </div>
  </div>
</div>
<style>
  #erweima{
    text-align: center;
    width: 322px;
    padding-top: 20px;
    display: none;
  }
  #erweima *{
    margin: 0 auto;
    display: block;
  }
  #erweima #qrImg{
    margin-bottom: 26px;
    display: block;
  }

  #qrmask{
    display: none;
    position: absolute;
    z-index: 300;
    width: 380px;
    height:  270px;
    background-color: #ffffff;
    opacity: 0.9;
    filter: alpha(opacity=90);
    top: 60px;
    left: 0;
  }
  #qrtimeout{
    text-align: center;
    display: none;
    position: absolute;
    z-index: 310;
    width: 380px;
    height: 100px;
    top: 60px;
    left: 0;
    margin-top: 100px;
  }
  #qrtimeout h6{
    display: block;
    font-weight: bold;
    font-size: 12px;
  }
  #qrtimeout a{
    display: block;
    background-color: #f52b00;
    color: #FFFFFF;
    height: 30px;
    width: 80px;
    line-height: 30px;
    border-radius: 5px;
    margin: 0 auto;
    margin-top: 10px;
  }
  .qrloading{
    margin-left: 144px !important;
    margin-top: 60px !important;
  }
  .l-r-box .loading{
    position:absolute;
    top: 70px;
    display: none;
    left: 0;
    z-index: 500;
    text-align: center;
    width: 100%;
    height: 100px;
    padding-top: 70px;
  }
  .l-r-box .loading img{
    margin-bottom: 30px;
     }
</style>
<div class="login">
	<input type="hidden" name="login" value="${logintiao }"/>
	<input type="hidden" name="tid" value="${tid }"/>
	<input type="hidden" name="ifremember" value="${ifremember}"/>
  <input type="hidden" class="verifyIMG" value="http://verifywww.yijiajiao.com.cn/verify/api/get/verify/img/image.json">
  <h1><a href=""><%-- <img src="<%=request.getContextPath() %>/js/yjj_ui3/logo-big.png"> --%>
  	<img src="<%=request.getContextPath() %>/js/yjj_ui1/logo.jpg" width="160" height="110">
  </a></h1>
  <div class="login-content">
    <div class="login-pic">
      <img src="<%=request.getContextPath() %>/js/yjj_ui3/logpic.png">
    </div>
    <div class="login-c-r">
      <div class="l-r-box">
        <img class="pic-yi1" src="<%=request.getContextPath() %>/js/yjj_ui3/login-yi-top1.png">
        <img class="pic-yi2" src="<%=request.getContextPath() %>/js/yjj_ui3/login-yi-top2.png">
        <p class="btn-tab cl">
          <a class="current" href="javascript:;">用户登录</a>
        </p>
        <ul id="upl">
          <li><input type="text" name="tel" class="telephone" placeholder="手机号" onblur="iftel()" value="${user.tel}"></li>
          <li><p class="telephoneErr" id="tel"></p></li>
          <li><input type="password" name="pwd" onselect="return false;" onpaste="return false;" class="password" placeholder="密码" onblur="ifpwd()" value="${user.pwd}"></li>
          <li><p class="passwordErr" id="pwd"></p></li>
          <li><input type="text" class="check" placeholder="输入验证码" onkeydown="login()" onblur="ifcode()" name="code"><a href=""><img id="vimg" onclick="changeCode()" title="看不清,点我换一张" src="<%=request.getContextPath() %>/AuthImageServlet" code-data="5eao"></a><a href="" onclick="changeCode()">换一张</a></li>
          <li><p class="checkErr" id="code"></p></li>
          <li><input class="login-btn" onclick="onlogin()"  value="登录" type="button"/></li>
          <li class="m-btn"><label class="checkbox"><input type="checkbox" id="remember" name="remember" value="1">记住密码</label><p class="right p-btn"><a href="inRegistPage">免费注册</a> | <a href="http://www.yijiajiao.com.cn/getPassword">忘记密码？</a></p></li>
        </ul>
      </div>
      <p class="txt">佳佳空间旗下其他产品：</p>
      <p class="txt">好学生用户、错题本用户可以直接登录</p>
    </div>
  </div>
</div>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/yjj_ui3/base.js.下载"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/yjj_ui3/qrcode.min.js.下载" defer="" async=""></script>
<div id="footer">
    <div class="footer">
        <ul class="footer-ul clearfix">
            <li class="icon-Email"><a href=""><strong></strong>yijiajiao@e-eduspace.com</a></li>
            <li class="icon-tel"><strong></strong>400-819-0811</li>
            <li class="icon-QQ"><a href="" target="_blank"><strong></strong>4008190811</a></li>
            <li class="icon-weixin"><strong></strong>关注宜佳佳微信公众号<span class="icon-ewm"></span></li>
        </ul>
        <div class="footer-div1">北京佳佳教育科技股份有限公司版权所有<span>|</span>服务协议<span>|</span><a href="" target="_blank">关于我们</a><strong>地址：北京市海淀区上地七街57号</strong></div>
            </a>
        </div>
    </div>
</div>

<div style="display: none; height: 0;">
 <script src="http://s95.cnzz.com/z_stat.php?id=1259467960&amp;web_id=1259467960" language="JavaScript" style="display: none !important;"></script>
</div>



</body></html>